﻿using AutoMapper;
using D.B.Data.API.Applications.Command;
using D.B.Data.API.Applications.Command.LeaveCommand;
using D.B.Data.API.Applications.Command.MenusCommand;
using D.B.Data.Domain;
using D.B.Data.Domain.DTO.Input;
using D.B.Data.Domain.DTO.Output;

namespace D.B.Data.API.Filter
{
    public class AutomapperProfile:Profile
    {
        public AutomapperProfile()
        {
            CreateMap<UserModel, LoginDTO>();
            CreateMap<AddUserCommand,UserModel>();
            CreateMap<UserModel,UserDTO>();
            CreateMap<UPdateUserCommand, UserModel>();
            CreateMap<RoleModel, QueryRoleDTO>();
            CreateMap<UserModel, GiveDeptIdGetUserDTO>();
            CreateMap<UserModel, GiveRoleGetUserOutput>();
            CreateMap<AddMenusCommand,MenusModel>();
            CreateMap<WorkflowModel, QueryLeaveDTO>();
            CreateMap<AddLeaveCommand, WorkflowModel>()
            .ForMember(dest => dest.LeaveTIme, opt => opt.Ignore())
            .ForMember(dest => dest.ReportTIme, opt => opt.Ignore());

            CreateMap<WorkflowModel, QueryUserLeaveDTO>();
            


        }
       
    }
}
